local baihe = fk.CreateSkill {
  name = "hanqing__baihe&",
}

Fk:loadTranslationTable{
  ["hanqing__baihe&"] = "捭阖",
  [":hanqing__baihe&"] = "你可以将多目标锦囊牌转化为<a href=':hanqing__vh_alliance'>【纵横捭阖】</a>。",

  ["#hanqing__baihe&"] = "将多目标锦囊牌当【纵横捭阖】使用",
}

baihe:addEffect("viewas", {
  anim_type = "control",
  pattern = "vh_alliance",
  prompt = "#hanqing__baihe&",
  card_filter = function (self, player, to_select, selected, selected_targets)
    return #selected == 0 and Fk:getCardById(to_select):isCommonTrick() and
      Fk:getCardById(to_select).multiple_targets
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 then return end
    local c = Fk:cloneCard("hanqing__vh_alliance")
    c.skillName = baihe.name
    c:addSubcards(cards)
    return c
  end,
  enabled_at_response = function (self, player, response)
    return not response
  end,
})

baihe:addAI(nil, "vs_skill")

return baihe
